package com.liyunc.socket.point.ping;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketAddress;

public class Client {
    public static void main(String[] args) throws IOException {
        Socket socket = new Socket();
        SocketAddress address = new InetSocketAddress("www.baidu.com", 80);
        socket.connect(address, 3000);
        System.out.println("连接到：" + socket.getInetAddress());
        socket.close();
    }
}
